package com.hunttown.common.sharding.client.support;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;

public class RouteResult {
    private List<String> resourceIdentities = new ArrayList(2);
    private String physicalTableName;

    public RouteResult() {
    }

    public String getPhysicalTableName() {
        return this.physicalTableName;
    }

    public void setPhysicalTableName(String physicalTableName) {
        this.physicalTableName = physicalTableName;
    }

    public List<String> getResourceIdentities() {
        return this.resourceIdentities;
    }

    public void addDbIdentities(List<String> resourceIdentities) {
        if (resourceIdentities != null) {
            this.resourceIdentities.addAll(resourceIdentities);
        }

    }

    public void addDbIdentities(String identity) {
        if (StringUtils.isNotBlank(identity)) {
            this.resourceIdentities.add(identity);
        }

    }
}